﻿#ifndef SETTLEACCOUNT_H
#define SETTLEACCOUNT_H

#include <QWidget>
#include "Global.h"

namespace Ui {
class SettleAccount;
}
struct SettleSt{
    int hour;//充电小时
    int min;//充电分钟
    int second;//秒
    int SOC;//当前SOC
    int chargemoney;//充电金额
    int chargepower;//充电电量
    int servermoney;//充电服务费
    int allmoney;//总金额
    int stopreason;//停止原因
    int stopDetailReason;// 2021-07-04 zhouhao detail reason
};
class SettleAccount : public QWidget
{
    Q_OBJECT
    
public:
    CountDownTime* countdown[GUN_AMOUNT];
    QLabel* time;
    QLabel* signal;
    explicit SettleAccount(QWidget *parent = 0);
    ~SettleAccount();

signals:
    void returnChargeGunCountdownStart(int GUN_NO);

public slots:
    void updateSettleAccount(int GUN_NO);
    void countdownOver();

private slots:
    void SetStopReason(int stopreason, int detailReason);
    void ShowSettleInfo(int current);
    void UpdateSettleSlot();
    void on_buttonOk_clicked();
    void on_pushButton_clicked();
    void setCountHide(int current);

private:
    int fulling_Info(int GUN_NO);
    SettleSt St[GUN_AMOUNT];
    QTimer* UpDateSettle[GUN_AMOUNT];
    Ui::SettleAccount *ui;
};

#endif // SETTLEACCOUNT_H
